.youtubeWrapper {
  max-width: 85%;
  margin: 0 auto;
  width: 100%;
}

.videoContainer {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.videoIframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  transition: opacity 0.3s ease;
}

.videoIframe.loading {
  opacity: 0.7;
}

.caption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
  font-style: italic;
}

.errorContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--ifm-color-emphasis-100);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}

.errorIcon {
  font-size: 2rem;
  color: var(--ifm-color-danger);
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .youtubeWrapper {
    max-width: 95%;
  }
}